package com.ck.dp.FilterPattern.person.service.impl;

import java.util.ArrayList;
import java.util.List;

import com.ck.dp.FilterPattern.person.domain.Person;
import com.ck.dp.FilterPattern.person.service.Criteria;

public class CriteriaFemale implements Criteria {
	/*
	 * 过滤所有女生的一个集合
	 * @see
	 * com.ck.dp.FilterPattern.person.service.Criteria#meetCriteria(java.util.
	 * List)
	 */
	public List<Person> meetCriteria(List<Person> persons) {
		List<Person> femalePersons = new ArrayList<Person>();
		for (Person person : persons) {
			if (person.getGender().equalsIgnoreCase("FEMALE")) {
				femalePersons.add(person);
			}
		}
		return femalePersons;
	}

}
